<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="Membership Change">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>
	
	<h:panelGrid width="100%" >
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
		</h:panelGroup>
	</h:panelGrid>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		 
		<h:panelGroup> 
			<h:outputLabel  value="#{messages['membership.no.label']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputLabel   value="#{adminChangeMembershipBean.member.membershipNo}" ></h:outputLabel>
		</h:panelGroup> 
		<h:panelGroup> 
			<h:outputLabel  value="Member Name" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputLabel   value="#{adminChangeMembershipBean.member.name}" ></h:outputLabel>
		</h:panelGroup> 
		<h:panelGroup> 
			<h:outputLabel  value="Agreement No." styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputLabel   value="#{adminChangeMembershipBean.agreement.agreetmentNo}" ></h:outputLabel>
 		</h:panelGroup>
		 
		<h:panelGroup> 
			<h:outputLabel  value="Membership Category" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputLabel   value="#{adminChangeMembershipBean.agreement.membership.membershipCategory.name}" ></h:outputLabel>
 		</h:panelGroup>
			 
		<h:panelGroup> 
			<h:outputLabel  value="Agreement Price" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
		    <h:outputLabel value="RM" />
		    <h:outputLabel  value="#{adminChangeMembershipBean.agreement.membership.membershipFee}" >
		    	<f:convertNumber pattern="#,###,###,##0.00"/>
			</h:outputLabel>
 		</h:panelGroup>
	</t:panelGrid>
	<h:panelGrid width="100%">
		<h:outputText value="New Membership"
				styleClass="sub_header" />
	</h:panelGrid>
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
	
		<h:outputText></h:outputText>
		<t:message for="newMembersip" styleClass="error"></t:message>
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="newMembersip"  value="New Membership" styleClass="standardText_Label" />
		</h:panelGroup>
		<t:selectOneRadio id="newMembersip" layout="pageDirection" required="true"
			 styleClass="standardText" value="#{adminChangeMembershipBean.membershipCode}" >
			<f:selectItems value="#{adminChangeMembershipBean.memberships}" />
		</t:selectOneRadio>
		
		<h:outputLabel for="otherRemark" value="Remark" styleClass="standardText_Label" />		
		<t:inputTextarea id="otherRemark" styleClass="standardText" cols="20" rows="5" value="#{adminChangeMembershipBean.remark}"></t:inputTextarea>
		
	</t:panelGrid>	
	
	<rich:spacer height="10"></rich:spacer>
		
	<t:panelGroup>
	   <t:panelGrid columns="2">
	   		<h:commandButton value="#{messages['submit']}" styleClass="button" action="#{adminChangeMembershipBean.changeMembershipAction}"  ></h:commandButton>
		    <h:commandButton value="#{messages['back']}" styleClass="button" action="#{adminProspectMagmtBean.navListAction}" immediate="true"></h:commandButton>
	   </t:panelGrid>
	</t:panelGroup>
		
</rich:panel>
